﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="MoreDetails.aspx.vb" Inherits="Haunted.HauntedLocationsInfo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <br />
        &nbsp;<asp:GridView ID="GridView3" runat="server" 
            AutoGenerateColumns="False" DataSourceID="SqlDataSource1picture">
            <Columns>
                <asp:ImageField DataImageUrlField="Picture" HeaderText="Picture">
                </asp:ImageField>
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1picture" runat="server" 
            ConnectionString="<%$ ConnectionStrings:HauntedLocationString %>" 
            ProviderName="<%$ ConnectionStrings:HauntedLocationString.ProviderName %>" 
            SelectCommand="SELECT [Picture] FROM [HauntedLocations] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        &nbsp;</p>
    <p>
        <asp:GridView ID="GridView4" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource1info">
            <Columns>
                <asp:BoundField DataField="LocationName" HeaderText="LocationName" 
                    SortExpression="LocationName" />
                <asp:BoundField DataField="Type" HeaderText="Type" SortExpression="Type" />
                <asp:BoundField DataField="Address" HeaderText="Address" 
                    SortExpression="Address" />
                <asp:BoundField DataField="City" HeaderText="City" SortExpression="City" />
                <asp:BoundField DataField="State" HeaderText="State" SortExpression="State" />
                <asp:BoundField DataField="ZipCode" HeaderText="ZipCode" 
                    SortExpression="ZipCode" />
                <asp:BoundField DataField="Coutry" HeaderText="Country" 
                    SortExpression="Coutry" />
                <asp:HyperLinkField DataNavigateUrlFields="Website" 
                    DataNavigateUrlFormatString="{0}" DataTextField="LocationName" 
                    HeaderText="Website" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1info" runat="server" 
            ConnectionString="<%$ ConnectionStrings:HauntedLocationString %>" 
            ProviderName="<%$ ConnectionStrings:HauntedLocationString.ProviderName %>" 
            SelectCommand="SELECT [LocationName], [Type], [Address], [City], [State], [ZipCode], [Coutry], [Website] FROM [HauntedLocations] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        <asp:GridView ID="GridView5" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource1Description">
            <Columns>
                <asp:BoundField DataField="Description" HeaderText="Description" 
                    SortExpression="Description" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1Description" runat="server" 
            ConnectionString="<%$ ConnectionStrings:HauntedLocationString %>" 
            ProviderName="<%$ ConnectionStrings:HauntedLocationString.ProviderName %>" 
            SelectCommand="SELECT [Description] FROM [HauntedLocations] WHERE ([ID] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        &nbsp;</p>

    <div style="overflow:auto;height:300px">
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource1comments">
            <Columns>
                <asp:TemplateField HeaderText="Comments">
                
                <ItemTemplate>

                <div style= "background-color:Silver">

                <span style = "background-color:Yellow" </span>
                <%# Eval("Author") %> </span><br />
                <%# Eval("Subject")%> <br />
                <%# Eval("Comment")%> <br />

                </div>

                </ItemTemplate>

                <AlternatingItemTemplate>

                <div style= "background-color:White">

                <span style = "background-color:Yellow" <br />
                <%# Eval("Author") %> </span> <br />
                <%# Eval("Subject") %> <br />
                <%# Eval("Comment")%> <br />

                </div>

                </AlternatingItemTemplate>

                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        </div>
        <asp:SqlDataSource ID="SqlDataSource1comments" runat="server" 
            ConnectionString="<%$ ConnectionStrings:HauntedLocationString %>" 
            ProviderName="<%$ ConnectionStrings:HauntedLocationString.ProviderName %>" 
            SelectCommand="SELECT [Author], [Subject], [Comment] FROM [Comments] WHERE ([HauntedLocations_fkid] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="HauntedLocations_fkid" QueryStringField="ID" 
                    Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
       <b> Add comment </b></p>
    <p>
        Author</p>
    <p>
        <asp:TextBox ID="tb_Author" runat="server" Width="300px"></asp:TextBox>
    </p>
    <p>
        Subject</p>
    <p>
        <asp:TextBox ID="tb_Subject" runat="server" Width="300px"></asp:TextBox>
    </p>
    <p>
        Comment</p>
    <p>
        <asp:TextBox ID="tb_Comment" runat="server" Height="200px" Width="300px"></asp:TextBox>
    </p>
    <p>
        <asp:Button ID="btn_comment" runat="server" Text="Submit Comment" />
    </p>
</asp:Content>
